namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_ReportFormat 主键列：ReportFormat_ReportID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_ReportFormat : Entity {
            
            protected String _ReportFormat_ReportID;
            
            protected Byte[] _ReportFormat_Format;
            
            protected Byte[] _ReportFormat_Content;
            
            public String ReportFormat_ReportID {
                get {
                    return this._ReportFormat_ReportID;
                }
                set {
                    this.OnPropertyValueChange(_.ReportFormat_ReportID, _ReportFormat_ReportID, value);
                    this._ReportFormat_ReportID = value;
                }
            }
            
            /// <summary>
            /// 存储二进制文件
            /// </summary>
            public Byte[] ReportFormat_Format {
                get {
                    return this._ReportFormat_Format;
                }
                set {
                    this.OnPropertyValueChange(_.ReportFormat_Format, _ReportFormat_Format, value);
                    this._ReportFormat_Format = value;
                }
            }
            
            public Byte[] ReportFormat_Content {
                get {
                    return this._ReportFormat_Content;
                }
                set {
                    this.OnPropertyValueChange(_.ReportFormat_Content, _ReportFormat_Content, value);
                    this._ReportFormat_Content = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_ReportFormat>("T_ReportFormat");
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.ReportFormat_ReportID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.ReportFormat_ReportID,
                        _.ReportFormat_Format,
                        _.ReportFormat_Content};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._ReportFormat_ReportID,
                        this._ReportFormat_Format,
                        this._ReportFormat_Content};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.ReportFormat_ReportID))) {
                    this._ReportFormat_ReportID = reader.GetString(_.ReportFormat_ReportID);
                }
                if ((false == reader.IsDBNull(_.ReportFormat_Format))) {
                    this._ReportFormat_Format = reader.GetBytes(_.ReportFormat_Format);
                }
                if ((false == reader.IsDBNull(_.ReportFormat_Content))) {
                    this._ReportFormat_Content = reader.GetBytes(_.ReportFormat_Content);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_ReportFormat).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_ReportFormat>();
                
                /// <summary>
                /// 字段名：ReportFormat_ReportID - 数据类型：String
                /// </summary>
                public static Field ReportFormat_ReportID = new Field<T_ReportFormat>("ReportFormat_ReportID");
                
                /// <summary>
                /// 存储二进制文件 - 字段名：ReportFormat_Format - 数据类型：Byte[]
                /// </summary>
                public static Field ReportFormat_Format = new Field<T_ReportFormat>("ReportFormat_Format");
                
                /// <summary>
                /// 字段名：ReportFormat_Content - 数据类型：Byte[]
                /// </summary>
                public static Field ReportFormat_Content = new Field<T_ReportFormat>("ReportFormat_Content");
            }
        }
    }
    